﻿using AutoMachine;
using CommonTool;
using Motions;
using Station;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
using System.Windows.Forms;

namespace Motions
{
    class OKMagMerge : StationBase
    {
        #region CT计算
        private Stopwatch CTtime = new Stopwatch();

        public string CT = "";

        #endregion

        #region 流程步

        private int AutoStep = 0;
        private int PutTimes = 1;
        #endregion

        public OKMagMerge(string name) : base(name) { }

        /// <summary>
        /// 停止流程
        /// </summary>
        public override void StopWork()
        {
            this.AutoStep = 0;
            PutTimes = 1;
            SystemMgr.GetInstance().WriteSysInt(SysInt.OKMagMergeStep, 0);
        }

        /// <summary>
        /// 急停流程
        /// </summary>
        public override void EmgWork()
        {
            this.AutoStep = 0;
            PutTimes = 1;
            SystemMgr.GetInstance().WriteSysInt(SysInt.OKMagMergeStep, 0);
        }

        /// <summary>
        /// 自动流程
        /// </summary>

        public override void AutoWork()
        {
            WriteSysInt(SysInt.OKMagMergeStep, AutoStep);
            WaitRun();

        
        }


      
    }
}
